package com.frame.common.enums;

import com.frame.common.enums.base.BaseEnum;

/**
 * @author Flying
 * @date 2018-08-16 17:52:35
 **/
public enum StatusType implements BaseEnum {


    NORMAL(1, "正常"),
	DELETE(0, "删除");


    private final int value;

    private final String description;


    StatusType(int value, String description) {
        this.value = value;
        this.description = description;
    }


    public static StatusType valueOf(Integer value) {
        for (StatusType item : values()) {
            if (item.getValue() .equals(value)) {
                return item;
            }
        }
        return null;
    }


    @Override
    public Integer getValue() {
        return value;
    }

    @Override
    public String getDescription() {
        return description;
    }

    public StatusType get(Integer value) {
        return StatusType.valueOf(value);
    }


    @Override
    public String toString() {
        return String.valueOf(this.value);
    }

}
